from django.conf.urls.defaults import patterns, include, url

# Uncomment the next two lines to enable the admin.py:
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from filebrowser import sites
import settings

admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'mysite.views.home', name='home'),
    # url(r'^mysite/', include('mysite.foo.urls')),

    # Uncomment the admin.py/doc line below to enable admin.py documentation:
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    (r'^grappelli/', include('grappelli.urls')),

    # Uncomment the next line to enable the admin.py:
    url(r'^admin/', include(admin.site.urls)),
    url(r'^$', 'mysite.jpkc.views.index'),
    url(r'^column/$', 'mysite.jpkc.views.column'),
    url(r'^column/(?P<cid>\d*)/$', 'mysite.jpkc.views.column'),
    url(r'^article/(?P<aid>\d*)/$', 'mysite.jpkc.views.article'),
    url(r'^ask/', 'mysite.jpkc.views.ask'),

    url(r'^admin/filebrowser/', include(sites.site.urls)),

)

#urlpatterns += staticfiles_urlpatterns()

urlpatterns += static(settings.MEDIA_URL , document_root = settings.MEDIA_ROOT)
urlpatterns += static(settings.STATIC_URL, document_root = settings.STATIC_ROOT)